package com.ryan.day05;

public class Demo06Return {
    public static void main(String[] args) {
        int[] arr = calculate(2, 52);
        int sum = arr[0];
        int avg = arr[1];
        System.out.println("总数："+sum);
        System.out.println("平均："+avg);
    }
        public static int[] calculate (int a,int b){
        /*int c = a + b;
        int avg = c / 2;*/
        int[] arr = {a + b,(a+b)/ 2};
        return  arr;
    }
}
